package com.mostromas.ess.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mostromas.ess.entities.ProductSeason;
import com.mostromas.ess.entities.ProductSize;
import com.mostromas.ess.product.mapper.ProductSeasonMapper;
import com.mostromas.ess.product.service.IProductSeasonService;
import com.mostromas.ess.util.base.Result;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductSeasonServiceImpl extends ServiceImpl<ProductSeasonMapper, ProductSeason> implements IProductSeasonService {
    @Override
    public Result selectAll() {
        QueryWrapper<ProductSeason> wrapper = new QueryWrapper<>();
        wrapper.orderByAsc("sort");
        List<ProductSeason> data = baseMapper.selectList(wrapper);
        return Result.ok(data);
    }
}
